In a server based computing environment, a server may communicate to a client changes in output of an application running on the server. The server may communicate these changes via a remote display protocol. In some cases, the server communicates graphical or drawing commands via the remote display protocol. For example, the server may communicate changes in the display caused by the application as a series of commands to draw the changes on the screen of the client. The server may send commands to the client to draw identified glyphs or bitmaps on the screen of the client. In this manner, instead of transmitting the entire output of the server application to the client, the server sends only the portions of the display that changed via a series of drawing commands.
As the client receives drawing commands and data to be drawn, the client may cache such data for future drawing commands. The server may provide a cache handle for such data to reference the data stored in the cache instead of retransmitting the data on subsequent drawing commands. For example, the server may send via the remote display protocol a command to draw a bitmap. The command may identify the draw command and use the cache handle to identify the bitmap to draw. When the client receives the draw command, it uses the corresponding cache handle to retrieve the bitmap to draw from its cache.
The server may use an arbitrary cache handle generation scheme. As a drawing command and/or bitmap for the drawing command is generated, the server may assign a unique cache identifier. For example, the server may use a sequential counter to simply assign the next bitmap to be cached the next available identifier. For different sessions between a server and multiple clients, the caches may not only include different bitmaps but the server may have generated different cache handles for the same bitmap.